package com.nwpu.coursesupport.view;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.nwpu.coursesupport.enumeration.TaskType;

public class TaskGradeListView implements Comparable<TaskGradeListView>{
	
	private TaskType type;
	private String title;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
	private Date scoreDate;
	private double score;
	
	public TaskType getType() {
		return type;
	}
	public void setType(TaskType type) {
		this.type = type;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Date getScoreDate() {
		return scoreDate;
	}
	public void setScoreDate(Date scoreDate) {
		this.scoreDate = scoreDate;
	}
	
	public double getScore() {
		return score;
	}
	public void setScore(double score) {
		this.score = score;
	}
	@Override
	public int compareTo(TaskGradeListView o) {
		return this.getScoreDate().compareTo(o.getScoreDate());
	}

}
